{% extends "app/base_site.html" %}

{% block title %} 工作台 {% endblock title %}

{% block stylesheets %}
  {{ block.super }}
{% endblock stylesheets %}

{% block content %}

  <div class="right_col" role="main">

{#    <div id="gender" class="btn-group" data-toggle="buttons">#}
{#        <label class="btn btn-default active" data-toggle-class="btn-primary" data-toggle-passive-class="btn-default">#}
{#          <input type="radio" name="gender" value="male" data-parsley-multiple="gender" data-parsley-id="12">#}
{#            &nbsp; 每日数据 &nbsp;#}
{#        </label>#}
{#        <label class="btn btn-primary" data-toggle-class="btn-primary" data-toggle-passive-class="btn-default">#}
{#          <input type="radio" name="gender" value="female" data-parsley-multiple="gender">#}
{#            &nbsp; 每月数据 &nbsp;#}
{#        </label>#}
{#      </div>#}

    <!-- top tiles -->
    <div class="row tile_count">
      <div class="col-md-4 col-sm-4 col-xs-6 tile_stats_count">
        <span class="count_top"><i class="fa fa-user"></i> 昨日收益</span>
        <div class="count">{{ yesterday_profit }}</div>
{#        <span class="count_bottom"><i class="green">4% </i> From last Week</span>#}
      </div>
      <div class="col-md-4 col-sm-4 col-xs-6 tile_stats_count">
        <span class="count_top"><i class="fa fa-clock-o"></i> 本月收益</span>
        <div class="count">{{ month_profit }}</div>
{#        <span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>3% </i> From last Week</span>#}
      </div>
      <div class="col-md-4 col-sm-4 col-xs-6 tile_stats_count">
        <span class="count_top"><i class="fa fa-user"></i> 累计收益</span>
        <div class="count green">{{ profit }}</div>
{#        <span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>34% </i> From last Week</span>#}
      </div>
    </div>
    <!-- /top tiles -->

    <br />

    <div class="row">
       <div class="col-md-12 col-sm-12 col-xs-12">
          <div class="x_panel">
            <div class="x_title">
              <h2>概览数据</h2>  &nbsp;&nbsp;&nbsp; <a class="btn btn-large btn-success"
                                                  href="/adv2_excel.csv">导出excel</a>
              <div class="clearfix"></div>
            </div>

            <div class="x_content">
              <div class="table-responsive">
                <table class="table table-striped jambo_table bulk_action">
                  <thead>
                    <tr class="headings">
                      <th>
                        <input type="checkbox" id="check-all" class="flat">
                      </th>
                      <th class="column-title">日期 </th>
                      <th class="column-title">广告位 </th>
                      <th class="column-title">广告位ID</th>
                      <th class="column-title">展示数</th>
                      <th class="column-title">点击数</th>
                      <th class="column-title">eCMP(元)</th>
                      <th class="column-title">当日收益(元)</th>
                    </tr>
                  </thead>

                  <tbody>
                    {% for profit in profit_list %}
                    <tr class="even pointer">
                      <td class="a-center ">
                        <input type="checkbox" class="flat" name="table_records">
                      </td>
                      <td class=" ">{{ profit.adv_date }}</td>
                      <td class=" ">{{ profit.adv_title }}</td>
                      <td class=" ">{{ profit.adv_id }}</td>
                      <td class=" ">{{ profit.adv_views }}</td>
                      <td class=" ">{{ profit.adv_clicks }}</td>
                      <td class="a-right a-right ">{{ profit.adv_eCPM }}</td>
                      <td class="a-right a-right ">{{ profit.adv_profit }}</td>
                      </td>
                    </tr>
                    {% endfor %}
                      <tr>
                            <td colspan="8">
                                <div class="dataTables_paginate paging_simple_numbers" id="datatable-keytable_paginate">
                                    <ul class="pagination">
                                        <li class="paginate_button previous {{ pre_disabled }}" id="datatable-keytable_previous">
                                            <a href="{{ pre_href }}" aria-controls="datatable-keytable" data-dt-idx="0" tabindex="0">上一页</a>
                                        </li>
                                        <li class="paginate_button disabled">
                                            <a href="#" aria-controls="datatable-keytable" data-dt-idx="6" tabindex="0">合计{{ pages }}页</a>
                                        </li>
                                        <li class="paginate_button next {{ next_disabled }}" id="datatable-keytable_next">
                                            <a href="{{ next_href }}" aria-controls="datatable-keytable" data-dt-idx="7" tabindex="0">下一页</a>
                                        </li>
                                    </ul>
                                </div>
                            </td>
                        </tr>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </div>

    </div>


    </div>
  </div>
{% endblock content %}

{% block javascripts %}
  {{ block.super}}
  <!-- Chart.js -->
  <script src="/static/vendors/Chart.js/dist/Chart.min.js"></script>
  <!-- gauge.js -->
  <script src="/static/vendors/gauge.js/dist/gauge.min.js"></script>
  <!-- Skycons -->
  <script src="/static/vendors/skycons/skycons.js"></script>
  <!-- Flot -->
  <script src="/static/vendors/Flot/jquery.flot.js"></script>
  <script src="/static/vendors/Flot/jquery.flot.pie.js"></script>
  <script src="/static/vendors/Flot/jquery.flot.time.js"></script>
  <script src="/static/vendors/Flot/jquery.flot.stack.js"></script>
  <script src="/static/vendors/Flot/jquery.flot.resize.js"></script>
  <!-- Flot plugins -->
  <script src="/static/vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script>
  <script src="/static/vendors/flot-spline/js/jquery.flot.spline.min.js"></script>
  <script src="/static/vendors/flot.curvedlines/curvedLines.js"></script>
  <!-- DateJS -->
  <script src="/static/vendors/DateJS/build/date.js"></script>
  <!-- JQVMap -->
  <script src="/static/vendors/jqvmap/dist/jquery.vmap.js"></script>
  <script src="/static/vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
  <script src="/static/vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
{% endblock javascripts %}

